package com.lc.index.service.impl;


import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lc.index.common.enums.ValiFlag;

import com.lc.index.mapper.OrdersMapper;
import com.lc.index.domain.Orders;
import com.lc.index.service.OrdersService;

/**
 * 存储订单基本信息Service业务层处理
 * 
 * @author autoGen
 * @date 2025-03-12
 */
@Service
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper,Orders> implements OrdersService
{

    @Resource
    private OrdersMapper ordersMapper;

    /**
     * 生成订单
     * @param orders
     * @return
     */
    @Override
    public Boolean createOrders(Orders orders) {
        return save(orders);
    }

    /**
     * 根据用户id获取订单信息
     * @param userId
     * @return
     */
    @Override
    public Orders getOrdersByUserId(Integer userId) {
        return ordersMapper.getOrdersByUserId(userId);
    }
}
